// JavaScript Document
$(document).ready(function() {
	var module_alert = $("#module").val(); //name of the module/functionality to display in alert box
  //openDialog("dam_agreement", 0, 375, 400, 'Agreement');
	
	//Function to execute on accepting the agreement
	$("#edit-submit-agreement").click(function () {
		if ($("#edit-accept-agreement").attr("checked") == false) {
			styleStatusMessages("Please agree the terms and confitions", "statusMessage", "failure");
			$("#Agreement").scrollTop(0);
			return false;
		}
		else {
			window.location.href = baseurl + "assets";
		}
		return false;
	});
	
	//Function to redirect the user to homepage if not selecting the 
	$("#edit-cancel-agreement").click(function () {
		window.location.href = baseurl;
	});
});